﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cecbData;
namespace cecbClasses.Data_Adapters
{
    public class Func_ProjectActivities
    {
        DSSEntities dataContext;
       public Func_ProjectActivities() {

           dataContext = new DSSEntities();
       }


       public List<ProjectActivities> getProjectActivityDetailsByCat(String name, String comp)
       {
           IQueryable<ProjectActivities> Query =
                 from c in dataContext.ProjectActivities
                 join b in dataContext.Activities on c.actv_reference equals b.actv_reference
                 where c.proj_reference.Contains(name) && b.actv_phase == comp
                 select c;

           List<ProjectActivities> SelectedComponent = Query.ToList();
           return SelectedComponent;

       }
    }
}
